#ifndef COLLISION_SENSOR_H
#define COLLISION_SENSOR_H

#include "Sensor.hpp"
#include "Side.hpp"

/**
 * This sensor detects collisions.
 */
class CollisionSensor : public Sensor
{
public:
	/**
	 * Constructor.
	 * @param side the enumerated side the sensor is placed.
	 */
	CollisionSensor(Side side);

	/**
	 * Returns the side the sensor is placed.
	 * @see side.hpp
	 * @return sensor's side.
	 */
	Side getSide();

	/**
	 * Check whether or not the sensor is activated.
	 * @return true if there is a collision, false if not.
	 */
	virtual bool poll();

	/**
	 * Get the type of the sensor.
	 * @see SensorType.hpp
	 * @return sensor's type, as enumerated in SensorType.
	 */
	virtual SensorType getSensorType();
private:
	Side side;
};
#endif
